#include <stdio.h>
#include <stdlib.h>
#include <strings.h>

int main(int argc, char **argv) {
	if(argc!=2) {
		fprintf(stderr,"Usage: allocmem nnn - allocate nnn megabytes of memory until <RETURN> pressed.\n");
		exit(1);
	}

	int i=atoi(argv[1]);
	char *mem;
	int x;
	for(x=0; x<i; x++) {
		mem=malloc(1024*1024);
		bzero(mem,1024*1024);
	}
	fread(mem,1,1,stdin);
}
